package com.demo.study.base.demos;

/**
 * Demo1_Int
 *
 * @author Baymax
 * @since 2024-08-21
 */
public class Demo1_Int {
    public static void main(String[] args) {
        //testInt();
        testNum();
    }

    private static void testNum() {
        int a = 5 % 2; // 取余 1
        int b = 5 / 2; // 取商 2
        System.out.println(a);
        System.out.println(b);
        /**
         * LRU（Least Recently Used）：最近最少使用
         * LFU（Least Frequently Used）：最少使用
         */
    }

    private static void testInt() {
        int a = 100;
        int b = 100;
        System.out.println(a == b); // true

        int c = 200;
        int d = 200;
        System.out.println(c == d); // true

        Integer i = 100;
        Integer j = 100;
        System.out.println(i == j); // true
        System.out.println(i.equals(j)); // true

        Integer m = 200;
        Integer n = 200;
        System.out.println(m == n); // false
        System.out.println(m.equals(n)); // true
    }
}
